package co.yixiang.retail.common.feign;

import co.yixiang.common.core.api.ApiResult;
import co.yixiang.common.core.constant.ServiceNameConstants;
import co.yixiang.retail.common.domain.UserInfo;
import co.yixiang.retail.common.hystrix.RemoteStoreUserFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;


@FeignClient(contextId = "remoteStoreUserService", value = ServiceNameConstants.MALL_RETAIL, fallbackFactory = RemoteStoreUserFallbackFactory.class)
public interface RemoteStoreUserService {

    @GetMapping(value = "/retail/getUser/{phone}")
    ApiResult<UserInfo> getRetailByPhone(@PathVariable("phone") String phone);

}
